import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import MyHome from "../views/MyHome.vue";
import MyFeeds from "../views/MyFeeds.vue";
import MyNews from "../views/MyNews.vue";
import MyUser from "../views/MyUser.vue";
import MyLogin from '../views/MyLogin.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: "/home",
    component: MyHome
  },
  {
    path: "/feeds",
    component: MyFeeds
  },
  {
    path: "/news",
    component: MyNews
  },
  {
    path: "/user",
    component: MyUser
  },
  {
    path:"/login",
    component:MyLogin
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
